<?php
class Historial_plan extends Modelo_base {

	var $table = 'historial_planes';

	var $has_one = array("afiliado", "plan");
	var $has_many = array("cuota", "cobertura", "prestacion_extra");

    // Validaciones de campos
    var $validation = array(
        'fecha_inicio' => array(
            'label' => 'Fecha de Inicio',
            'rules' => array('required', 'prepararFecha', 'valid_date'),
            'get_rules' => array('prepararFecha')
            ),
        'plan' => array(
            'label' => 'Plan',
            'rules' => array('required')
            ),
        'afiliado' => array(
            'label' => 'Afiliado',
            'rules' => array('required')
            )
    );

    // Optionally, don't include a constructor if you don't need one.
    function __construct($id = NULL)
    {
        parent::__construct($id);
    }
}

/* End of file historial_plan.php */
/* Location: ./application/models/historial_plan.php */